package com.zy.modules.mall.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

import java.math.BigDecimal;


/**
 * 商品
 */
@Entity
@Table(name = "t_product")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ProductEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	//
	@Id
	@GeneratedValue
	private Long id;
	//
	private Long sellerId;
	//编号
	private String sn;
	//商品名
	private String name;
	//销售价
	private String price;
	//市场价
	private BigDecimal marketPrice;
	//展示图片
	private String image;
	//库存
	private Integer stock;
	//统一规格物流重量
	private BigDecimal deliveryWeight;
	//是否上架
	private Boolean isMarketable;
	//是否统一规格
	private Boolean isUnifiedSpec;
	//是否列出
	private Boolean isList;
	//商品详情
	private String introduction;
	//销量
	private Long sales;
	//商品品类
	private Long productCategoryId;
	//是否统一邮费 0 统一，1 按模板
	private Integer deliveryType;
	//
	private BigDecimal deliveryFees;
	//
	private Long deliveryTemplateId;
	//创建日期
	private Date created;
	//更新日期
	private Date updated;
	//
	private Integer active;
}
